<template>
	<el-dialog title="文件历史版本列表" v-model="visible" :width="800" destroy-on-close @closed="$emit('closed')">
		<scTable ref="table" :apiObj="apiObj" :params="{attachId:this.thisAttachId}" row-key="attachId"  stripe remoteSort remoteFilter>
			<el-table-column label="#" type="index" width="50"></el-table-column>
			<el-table-column label="文件名" prop="newName" width="300" :show-overflow-tooltip="true">
				<template #default="scope">
					<attach-menu :attachIds="scope.row.attachId" :roleFlag="3" :preview="true"></attach-menu>
				</template>
			</el-table-column>
			<el-table-column label="版本号" prop="version" width="100"></el-table-column>
			<el-table-column label="创建人" prop="createUserName" width="100"></el-table-column>
			<el-table-column label="创建时间" prop="createTime" width="150" fixed="right" align="right"></el-table-column>
		</scTable>
	</el-dialog>
</template>

<script>
import AttachMenu from '@/views/module/attachMenu'
export default {
	name: 'Attach Version',
	components: {
		AttachMenu
	},
	props:{
		attachId:String
	},
	data() {
		return {
			apiObj: this.$API.file.attach.getAttachVersionList,
			loading: false,
			thisAttachId:this.attachId,
			form: {},
			visible: false,
			isSaveing: false,
		}
	},
	mounted() {

	},
	methods: {
		//显示
		open(attachId) {
			this.thisAttachId = attachId;
			this.visible = true;
			return this;
		},
	}
}
</script>

<style>
</style>
